local Config = require("Config")
local Msg = require("core.Msg")
local ProtoId = require("common.ProtoID")


local black_module = {  --禁止的模块
family = 1,
friend = 1,
rank = 1,
market =1,
}
black = {}

local black_proto = {  --禁止的独立协议
  "CG_COPY_ENTER",
  "CG_ASK_CHANGE_SCENE",
  "CG_TASK_FLY",
  "CG_ASK_MAIL_LIST",
  "CG_MAIL_DETAIL",
  "CG_FETCH_ATTACHMENT",
  "CG_READ_MAIL",
  "CG_COPY_TEAM_SIGN",
  "CG_COPY_TEAM_READY",
  "CG_COPY_TEAM_SIGN_EXIT"
}

local hash = {}
for k, v in pairs(ProtoId) do
  if type(k) == "number" and string.sub(v, 1, 1) == "C" then
    if hash[v] then
      assert()
    end
    hash[v] = k
  end
end
for k, v in ipairs(black_proto) do
  local id = hash[v]
  if not id then
    assert(nil, v)
  end
  black[id] = true
end

function checkBlack(module_name, proto_id)
   if black_module[module_name] then
      black[proto_id] = true
   end
end

function isBlack(protoID)
  return black[protoID]
end


